package com.example.demo.model;

import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 图书信息
 *
 * @author Liunh
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "ExportBook", description = "图书信息请求参数")
public class ExportBook implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 当前架位
     */
    @NotBlank(message = "currentLocation 当前架位不能为空！")
    @ApiModelProperty(name = "currentLocation", value = "当前架位", required = true, example = "")
    @Excel(name = "当前架位",width =60)
    private String currentLocation;

    /**
     * 图书状态
     *  -3：报失（流通过程中丢失） -2：遗失 -1：报废
     * 0：存档（不可流通）
     * 1：正常 100：审查"
     */
    @NotBlank(message = "currentStatusId 图书状态不能为空！")
    @ApiModelProperty(name = "currentStatusId", value = "图书状态", required = true, example = "")
    @Excel(name = "图书状态",width =60)
    private Integer currentStatusId;

    /**
     * 批次号
     * 导入数据时才有值
     */
    @ApiModelProperty(name = "batchNo", value = "批次号,导入数据时自动生成", required = false, example = "")
    private String batchNo;

    /**
     * 图书条码/主馆藏标识
     */
    @NotBlank(message = "barCode 图书条码不能为空！")
    @ApiModelProperty(name = "barCode", value = "图书条码", required = true, example = "")
    @Excel(name = "图书条码",width =60)
    private String barCode;
    /**
     * 电子标签物理卡号
     */
    @ApiModelProperty(name = "bookTid", value = "电子标签物理卡号", required = false, example = "")
    @Excel(name = "电子标签物理卡号",width =60)
    private String bookTid;
    /**
     * 所属馆机构号
     */
    @ApiModelProperty(name = "orgCode", value = "机构号", required = false, example = "")
    @Excel(name = "机构号",width =60)
    private String orgCode;
    /**
     * 图书在所属图书管理系统/平台的唯一标识
     */
    @ApiModelProperty(name = "sysUniqueId", value = "图书在所属图书管理系统/平台的唯一标识", required = false, example = "")
    @Excel(name = "平台号",width =100)
    private String sysUniqueId;
    /**
     * 所属图书管理系统/平台标识
     */
    @ApiModelProperty(name = "sysId", value = "所属图书管理系统/平台标识", required = false, example = "")
    @Excel(name = "平台记录号",width =100)
    private String sysId;
    /**
     * 所属架位
     */
    @NotNull(message = "initLocation 所属架位不能为空！")
    @ApiModelProperty(name = "initLocation", value = "所属架位", required = true, example = "")
    @Excel(name = "所属架位",width =20)
    private Integer initLocation;

    /**
     * 标签物理id
     */
    @ApiModelProperty(name = "rfId", value = "标签物理号", required = false, example = "")
    @Excel(name = "标签物理号",width =60)
    private String rfId;

    /**
     * 书名
     */
    @NotBlank(message = "title 书名不能为空！")
    @ApiModelProperty(name = "title", value = "书名", required = true, example = "")
    @Excel(name = "书名",width =600)
    private String title;

    /**
     * 副题名
     */
    @ApiModelProperty(name = "subTitle", value = "副题名", required = false, example = "")
    @Excel(name = "副题名",width =600)
    private String subTitle;

    /**
     * 作者
     */
    @ApiModelProperty(name = "author", value = "作者", required = false, example = "")
    @Excel(name = "作者",width =600)
    private String author;

    /**
     * 作者编号
     */
    @NotBlank(message = "authorNo 作者编号不能为空！")
    @ApiModelProperty(name = "authorNo", value = "作者编号", required = true, example = "")
    @Excel(name = "作者编号",width =100)
    private String authorNo;

    /**
     * ISBN
     */
    @NotBlank(message = "ISBN ISBN不能为空！")
    @ApiModelProperty(name = "isbn", value = "ISBN", required = true, example = "")
    @Excel(name = "ISBN",width =100)
    private String isbn;

    /**
     * 出版社
     */
    @NotBlank(message = "publisher 出版社不能为空！")
    @ApiModelProperty(name = "publisher", value = "出版社", required = true, example = "")
    @Excel(name = "出版社",width =600)
    private String publisher;

    /**
     * 分类（指22大类）
     */
    @NotBlank(message = "categoryType 分类（指22大类A-Z）不能为空！")
    @ApiModelProperty(name = "categoryType", value = "分类（指22大类A-Z）", required = true, example = "")
    @Excel(name = "分类（22大类）",width =50)
    private String categoryType;
    /**
     * 分类号
     */
    @NotBlank(message = "categoryNum 分类号不能为空！")
    @ApiModelProperty(name = "categoryNum", value = "分类号", required = true, example = "")
    @Excel(name = "分类号",width =50)
    private String categoryNum;

    /**
     * 尺寸
     */
    @ApiModelProperty(name = "size", value = "尺寸", required = false, example = "")
    @Excel(name = "尺寸",width =50)
    private String size;

    /**
     * 页码
     */
    @ApiModelProperty(name = "page", value = "页码", required = false, example = "")
    @Excel(name = "页码",width =50)
    private String page;

    /**
     * 价格
     */
    @NotNull(message = "price 价格不能为空！")
    @ApiModelProperty(name = "price", value = "价格", required = true, example = "")
    @Excel(name = "价格",width =20)
    private BigDecimal price;

    /**
     * 出版社编号
     */
    @NotBlank(message = "publisherCode 出版社编号不能为空！")
    @ApiModelProperty(name = "publisherCode", value = "出版社编号", required = true, example = "")
    @Excel(name = "出版社编号",width =200)
    private String publisherCode;

    /**
     * 出版日期
     */
    @NotNull(message = "publishDate 出版日期不能为空！")
    @ApiModelProperty(name = "publishDate", value = "出版日期", required = true, example = "")
    @Excel(name = "出版日期",width =100)
    private String publishDate;

    /**
     * 摘要
     */
    @ApiModelProperty(name = "remark", value = "摘要", required = false, example = "")
    @Excel(name = "摘要",width =2000)
    private String remark;

    /**
     * 翻译
     */
    @ApiModelProperty(name = "translator", value = "翻译", required = false, example = "")
    @Excel(name = "翻译",width =200)
    private String translator;

    /**
     * 类型（1图书 2报刊/杂志 3多媒体）
     */
    @NotNull(message = "mediaType 类型（1图书 2报刊/杂志 3多媒体）不能为空！")
    @ApiModelProperty(name = "mediaType", value = "媒体类型", required = true, example = "")
    @Excel(name = "媒体类型",width =20)
    private Integer mediaType;

    /**
     * 是否在架（0不在架；1在架）
     */
    @NotBlank(message = "onShelf 是否在架（0不在架；1在架）不能为空！")
    @ApiModelProperty(name = "onShelf", value = "是否在架（0不在架；1在架）", required = true, example = "")
    @Excel(name = "是否在架",width =20)
    private Integer onShelf;

    /**
     * 上架时间
     */
    @NotNull(message = "upShelfDate 上架时间不能为空！")
    @ApiModelProperty(name = "upShelfDate", value = "上架时间", required = true, example = "")
    @Excel(name = "上架时间",width =60)
    private String upShelfDate;

    /**
     * 下架时间
     */
    @ApiModelProperty(name = "offShelfDate", value = "下架时间", required = false, example = "")
    @Excel(name = "下架时间",width =60)
    private String offShelfDate;

    /**
     * 记录版本号；结合SysID+SYSUniqueID用于数据同步
     */
    @NotNull(message = "version 记录版本号不能为空！")
    @ApiModelProperty(name = "version", value = "记录版本号, timestamp字符串", required = true, example = "1685439200787")
    @Excel(name = "版本号",width =100)
    private String version;

}
